#pragma once

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#define INITIALMAX 16

typedef struct Node{   //节点
    void * key;
    void * value;
    struct Node * next;
} Node;

typedef struct HashMap{
    Node ** nodes;    //数组
    int curSz;
    int max;
} HashMap;

HashMap* Init();
int IsEmpty(HashMap * hashMap);
void Print(HashMap * hashMap);
void Put(HashMap* hashMap, void* key, void* value);
void * Get(HashMap * hashMap,void* key);
void Delete(HashMap * hashMap, void* key);
void Clear(HashMap * hashMap);
int ContainKey(HashMap* hashMap, void* key);